package com.cs.paoyer.common.util;

import java.text.SimpleDateFormat; 
import java.util.Date;

import com.cs.paoyer.common.exception.UserException;
import com.cs.paoyer.common.exception.CommonUserException;



public class Conversion 
{
	public Conversion()
	{
	}

	public static Date convertStringToDate(String strDate)
	{
			Date date = null;
			try
			{
					SimpleDateFormat format = new SimpleDateFormat( "yyyy-MM-dd" ); 
					date = format.parse( strDate );					
      }
			catch(Exception e)
			{
					throw new UserException(new CommonUserException().getModuleVO(), 
						 CommonUserException.INCORRECT_DATE_FORMAT  );     
			}
			return date;
	}
}